package com.huatai.bi.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 数据集表
 * @TableName tb_direct_data_set
 */
@Data
@TableName(value ="tb_direct_data_set")
@ApiModel(value = "数据集模型")
public class DirectDataSetEntity implements Serializable {

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	/**
	 * 数据集id
	 */
	@TableId(type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 数据目录id
	 */
	@ApiModelProperty(value = "数据目录id")
	@TableField("dt_id")
	private Long dtId;

	/**
	 * 数据源id
	 */
	@ApiModelProperty(value = "数据源id")
	@TableField("ds_id")
	private Long dsId;

	/**
	 * 数据表名称
	 */
	@ApiModelProperty(value = "数据表名称")
	@TableField("table_name")
	private String tableName;

	/**
	 * 代码脚本(包括python、sql)
	 */
	@ApiModelProperty(value = "代码脚本(包括python、sql)")
	@TableField("code_script")
	private String codeScript;

	/**
	 * 类型(见字典表：ds_type)
	 */
	@ApiModelProperty(value = "类型(见字典表：ds_type)")
	private String type;

	/**
	 * 是否删除(1已删除，0未删除)
	 */
	@ApiModelProperty(value = "是否删除(1已删除，0未删除)")
	@TableField("is_deleted")
	@TableLogic
	private boolean isDeleted;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@TableField(value = "create_time",fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;

	@TableField(value = "create_by",fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建人")
	private String createBy;

	@TableField(value = "update_by",fill = FieldFill.INSERT)
	@ApiModelProperty(value = "更新人")
	private String updateBy;

	@ApiModelProperty(value = "任务ID")
	@TableField(value = "task_id",updateStrategy = FieldStrategy.IGNORED)
	private Integer taskId;

	@ApiModelProperty(value = "数据更新时间")
	@TableField(value = "data_update_time")
	private Date dataUpdateTime;
}
